package com.shengdai.urms.core.model;


/**
 */
public class UmMenu implements java.io.Serializable {

	private static final long	serialVersionUID	= 30015016L;

	private int					size;

	private int					sizeitem;

	private String				menuid;									// 功能ID

	private String				leaf;

	private String				menucode;									// 功能编号

	private String				syscode;									// 系统代码

	private String				menuname;									// 功能名称

	private String				showtype;									// 显示类别

	private String				refurl;									// 参考连接

	private String				parentid;									// 父ID

	private String				parentids;									// 所有父ID

	private String				smallicon;									// 小图标

	private String				bigicon;									// 大图标

	private String				apptype;									// 业务类型

	private Float				showorder;									// 显示顺序

	private UmMenu[]			children			= new UmMenu[0];		// 子菜单

	private UmMenuitem[]		menuitems			= new UmMenuitem[0];	// 功能点

	private String				paramin;

	private String				paramout;

	private String				target;										// 目标

	private String				refsys;										// 关联系统

	private String				processid;									// 流程ID

	private String				menutype;									// 菜单类型（新建0，编辑1，查看2，报表3，手机4...）
	private String				userid;									//  用户ID
	
	public String getTarget() {
		return target;
	}

	public void setTarget(String target) {
		this.target = target;
	}

	public int size() {
		return size;
	}

	public int sizeItem() {
		return sizeitem;
	}

	public UmMenu[] getChildren() {
		return children;
	}

	public void setChildren(UmMenu[] children) {
		this.children = children;
	}

	public String getMenuid() {
		return menuid;
	}

	public void setMenuid(String menuid) {
		this.menuid = menuid;
	}

	public String getSyscode() {

		return syscode;
	}

	public void setSyscode(String syscode) {
		this.syscode = syscode;
	}

	public String getMenuname() {
		return menuname;
	}

	public void setMenuname(String menuname) {
		this.menuname = menuname;
	}

	public String getShowtype() {
		return showtype;
	}

	public void setShowtype(String showtype) {
		this.showtype = showtype;
	}

	public String getRefurl() {
		return refurl;
	}

	public void setRefurl(String refurl) {
		this.refurl = refurl;
	}

	public String getParentid() {
		return parentid;
	}

	public void setParentid(String parentid) {
		this.parentid = parentid;
	}

	public String getSmallicon() {
		return smallicon;
	}

	public void setSmallicon(String smallicon) {
		this.smallicon = smallicon;
	}

	public String getBigicon() {
		return bigicon;
	}

	public void setBigicon(String bigicon) {
		this.bigicon = bigicon;
	}

	public String getApptype() {
		return apptype;
	}

	public void setApptype(String apptype) {
		this.apptype = apptype;
	}

	public Float getShoworder() {
		return showorder;
	}

	public void setShoworder(Float showorder) {
		this.showorder = showorder;
	}

	public boolean addChild(UmMenu o) {
		ensureCapacity(size + 1);
		children[size++] = o;
		return true;
	}

	public void ensureCapacity(int minCapacity) {
		int oldCapacity = children.length;
		if (minCapacity > oldCapacity) {
			Object oldData[] = children;
			int newCapacity = (oldCapacity * 3) / 2 + 1;
			if (newCapacity < minCapacity)
				newCapacity = minCapacity;
			children = new UmMenu[newCapacity];
			System.arraycopy(oldData, 0, children, 0, size);
		}
	}

	public void curtate(){//缩短为实际大小 add by hqm 2010-03-30
		if(size==0)return;
		Object oldData[] = children;
		children = new UmMenu[size];
		System.arraycopy(oldData, 0, children, 0, size);
	}

	public boolean addItems(UmMenuitem o) {
		ensureCapacity1(sizeitem + 1);
		menuitems[sizeitem++] = o;
		return true;
	}

	public void ensureCapacity1(int minCapacity) {
		int oldCapacity = menuitems.length;
		if (minCapacity > oldCapacity) {
			Object oldData[] = menuitems;
			int newCapacity = (oldCapacity * 3) / 2 + 1;
			if (newCapacity < minCapacity)
				newCapacity = minCapacity;
			menuitems = new UmMenuitem[newCapacity];
			System.arraycopy(oldData, 0, menuitems, 0, sizeitem);
		}
	}

	public String getMenucode() {
		return menucode;
	}

	public void setMenucode(String menucode) {
		this.menucode = menucode;
	}

	public String getParentids() {
		return parentids;
	}

	public void setParentids(String parentids) {
		this.parentids = parentids;
	}

	public UmMenuitem[] getMenuitems() {
		return menuitems;
	}

	public void setMenuitems(UmMenuitem[] menuitems) {
		this.menuitems = menuitems;
	}

	public String getLeaf() {
		return leaf;
	}

	public void setLeaf(String leaf) {
		this.leaf = leaf;
	}

	public int getSize() {
		return size;
	}

	public void setSize(int size) {
		this.size = size;
	}

	public int getSizeitem() {
		return sizeitem;
	}

	public String getProcessid() {
		return processid;
	}

	public void setProcessid(String processid) {
		this.processid = processid;
	}

	public String getRefsys() {
		return refsys;
	}

	public void setRefsys(String refsys) {
		this.refsys = refsys;
	}

	public String getParamin() {
		return paramin;
	}

	public void setParamin(String paramin) {
		this.paramin = paramin;
	}

	public String getParamout() {
		return paramout;
	}

	public void setParamout(String paramout) {
		this.paramout = paramout;
	}

	public String getMenutype() {
		return menutype;
	}

	public void setMenutype(String menutype) {
		this.menutype = menutype;
	}

	public void setSizeitem(int sizeitem) {
		this.sizeitem = sizeitem;
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

}
